﻿/*=================================================================
* 版权信息：Copyright (C) 2005-2011 捷点科技 All Rights Reserved.
* 文件名称：CNVP_ProTypeRefStandard.cs
* 创建标识：曾乃强 15158756652 2011-04-01 10:04:13
* 修改标识：
* 功能描述：业务层
===================================================================*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace CNVP.JShop.BLL 
{
    /// <summary>
    /// 对*CNVP_ProTypeRefStandard*操作(针对业务层)的实现
    /// </summary>
    public class CNVP_ProTypeRefStandard
    {
        DAL.CNVP_ProTypeRefStandard dal = new DAL.CNVP_ProTypeRefStandard();
        
        #region BLL
        #region 添加
        /// <summary>
        /// 添加
        /// </summary>
        public int Add_CNVP_ProTypeRefStandard(Model.CNVP_ProTypeRefStandard obj)
        {
            return dal.Insert(obj);
        }
        #endregion
        
        #region 修改
        /// <summary>
        /// 修改
        /// </summary>
        public int Update_CNVP_ProTypeRefStandard(Model.CNVP_ProTypeRefStandard obj)
        {
            return dal.Update(obj);
        }
        #endregion
        
        #region 删除
        /// <summary>
        /// 删除
        /// </summary>
        public int Delete_CNVP_ProTypeRefStandard(Model.CNVP_ProTypeRefStandard obj)
        {
            return dal.Delete(obj);
        }
        
        /// <summary>
        /// 删除,生成列的主键列构成的参数列表
        /// </summary>
        public int Delete_CNVP_ProTypeRefStandard(int ID)
        {
            return this.Delete_CNVP_ProTypeRefStandard(new Model.CNVP_ProTypeRefStandard() {
            
                 ID=ID
            });
        }
        #endregion 
        
        /// <summary>
        /// 查看单个
        /// </summary>
        public Model.CNVP_ProTypeRefStandard GetSingle_CNVP_ProTypeRefStandardById(int ID)
        {
            return dal.LoadById(ID);
        }
        #endregion

        /// <summary>
        /// 查看,商品类型ID
        /// </summary>
        public List<Model.CNVP_ProTypeRefStandard> GetAll_CNVP_ProTypeRefStandard(int ProductTypeID)
        {
            return dal.LoadAll(ProductTypeID);
        }

        public DataTable getTableByWhere(string sqlWhere)
        {
           return dal.getTableByWhere(sqlWhere);
        }
        public int DeleteNotIn(int ProductTypeID, string nowid)
        {
            return dal.DeleteNotIn(ProductTypeID, nowid);
        }
    }
}

